<?php

namespace INT\AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Filiere
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Filiere
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="designation", type="string", length=255)
     */
    private $designation;
/**
   * @ORM\OneToMany(targetEntity="INT\AdminBundle\Entity\Groupe", mappedBy="groupes")
   */
  private $groups;
  
  /**
   * @ORM\OneToMany(targetEntity="INT\AdminBundle\Entity\Seance", mappedBy="filiere")
   */
  private $seances;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set designation
     *
     * @param string $designation
     * @return Filiere
     */
    public function setDesignation($designation)
    {
        $this->designation = $designation;
    
        return $this;
    }

    /**
     * Get designation
     *
     * @return string 
     */
    public function getDesignation()
    {
        return $this->designation;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->groups = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add groups
     *
     * @param \INT\AdminBundle\Entity\Groupe $groups
     * @return Filiere
     */
    public function addGroup(\INT\AdminBundle\Entity\Groupe $groups)
    {
        $this->groups[] = $groups;
    
        return $this;
    }

    /**
     * Remove groups
     *
     * @param \INT\AdminBundle\Entity\Groupe $groups
     */
    public function removeGroup(\INT\AdminBundle\Entity\Groupe $groups)
    {
        $this->groups->removeElement($groups);
    }

    /**
     * Get groups
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getGroups()
    {
        return $this->groups;
    }
    public function __toString() {
        return $this->getDesignation();
    }


    /**
     * Add seances
     *
     * @param \INT\AdminBundle\Entity\Seance $seances
     * @return Filiere
     */
    public function addSeance(\INT\AdminBundle\Entity\Seance $seances)
    {
        $this->seances[] = $seances;
    
        return $this;
    }

    /**
     * Remove seances
     *
     * @param \INT\AdminBundle\Entity\Seance $seances
     */
    public function removeSeance(\INT\AdminBundle\Entity\Seance $seances)
    {
        $this->seances->removeElement($seances);
    }

    /**
     * Get seances
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getSeances()
    {
        return $this->seances;
    }
}